package com.jule.miaozhuapc.dao;

import org.springframework.data.repository.Repository;

import com.jule.miaozhuapc.domain.WawaUser;
import com.jule.miaozhuapc.req.dto.WxUserInfo;


public interface UserDao extends Repository<WawaUser, Long>{

	public WawaUser save(WawaUser bean);
	
//	@Query("select count(*) from User bean where bean.group.id in ?1")
//	public long countByGroupId(Collection<Integer> groupIds);
	
	public WawaUser findByUsername();
	
	/**
	 *  新建
	 * @param user
	 * @return
	 */
	//public WawaUser inserth5(WxUserInfo wxUser);

	/**
	 *  通过userId 查用户
	 * @param userId
	 * @return
	 */
	public WawaUser findByUserId(Long id);

	public WawaUser findByWxOpenId(String wxOpenId);
	
	public  void updateUser(WawaUser wawaUser);
	
	public WawaUser findByToken(String token);
}